#include<iostream>
using namespace std;
int main(){
  int day[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
  auto isLeapYear=[](int year){
    return (year%4==0&&year%100!=0)||year%400==0;
  };
  int cnt=1;
  for(int y=2000;y<2000000;y++){
    for(int m=1;m<=12;m++){
      int dd=day[m]+(isLeapYear(y)&&m==2);
      for(int d=1;d<=dd;d++)
      cnt+=(y%m==0&&y%d==0);
    }
  }
  cout<<cnt;
}